﻿using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Terraria.ModLoader
{
	// Token: 0x02000192 RID: 402
	public class GlobalNPC
	{
		// Token: 0x1700012B RID: 299
		// (get) Token: 0x0600102A RID: 4138 RVA: 0x0000EAD1 File Offset: 0x0000CCD1
		// (set) Token: 0x0600102B RID: 4139 RVA: 0x0000EAD9 File Offset: 0x0000CCD9
		public Mod mod { get; internal set; }

		// Token: 0x1700012C RID: 300
		// (get) Token: 0x0600102C RID: 4140 RVA: 0x0000EAE2 File Offset: 0x0000CCE2
		// (set) Token: 0x0600102D RID: 4141 RVA: 0x0000EAEA File Offset: 0x0000CCEA
		public string Name { get; internal set; }

		// Token: 0x0600102E RID: 4142 RVA: 0x0000EAF3 File Offset: 0x0000CCF3
		public virtual bool Autoload(ref string name)
		{
			return this.mod.Properties.Autoload;
		}

		// Token: 0x1700012D RID: 301
		// (get) Token: 0x0600102F RID: 4143 RVA: 0x0000ADF8 File Offset: 0x00008FF8
		public virtual bool InstancePerEntity
		{
			get
			{
				return false;
			}
		}

		// Token: 0x06001030 RID: 4144 RVA: 0x0000EB05 File Offset: 0x0000CD05
		public GlobalNPC Instance(NPC npc)
		{
			if (!this.InstancePerEntity)
			{
				return this;
			}
			return npc.globalNPCs[this.instanceIndex];
		}

		// Token: 0x1700012E RID: 302
		// (get) Token: 0x06001031 RID: 4145 RVA: 0x0000ADF8 File Offset: 0x00008FF8
		public virtual bool CloneNewInstances
		{
			get
			{
				return false;
			}
		}

		// Token: 0x06001032 RID: 4146 RVA: 0x0000EB1E File Offset: 0x0000CD1E
		public virtual GlobalNPC Clone()
		{
			return (GlobalNPC)base.MemberwiseClone();
		}

		// Token: 0x06001033 RID: 4147 RVA: 0x0040502C File Offset: 0x0040322C
		public virtual GlobalNPC NewInstance(NPC npc)
		{
			if (this.CloneNewInstances)
			{
				return this.Clone();
			}
			GlobalNPC globalNPC = (GlobalNPC)Activator.CreateInstance(base.GetType());
			globalNPC.mod = this.mod;
			globalNPC.Name = this.Name;
			globalNPC.index = this.index;
			globalNPC.instanceIndex = this.instanceIndex;
			return globalNPC;
		}

		// Token: 0x06001034 RID: 4148 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void SetDefaults(NPC npc)
		{
		}

		// Token: 0x06001035 RID: 4149 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void ScaleExpertStats(NPC npc, int numPlayers, float bossLifeScale)
		{
		}

		// Token: 0x06001036 RID: 4150 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void ResetEffects(NPC npc)
		{
		}

		// Token: 0x06001037 RID: 4151 RVA: 0x00008CF7 File Offset: 0x00006EF7
		public virtual bool PreAI(NPC npc)
		{
			return true;
		}

		// Token: 0x06001038 RID: 4152 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void AI(NPC npc)
		{
		}

		// Token: 0x06001039 RID: 4153 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void PostAI(NPC npc)
		{
		}

		// Token: 0x0600103A RID: 4154 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void FindFrame(NPC npc, int frameHeight)
		{
		}

		// Token: 0x0600103B RID: 4155 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void HitEffect(NPC npc, int hitDirection, double damage)
		{
		}

		// Token: 0x0600103C RID: 4156 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void UpdateLifeRegen(NPC npc, ref int damage)
		{
		}

		// Token: 0x0600103D RID: 4157 RVA: 0x00008CF7 File Offset: 0x00006EF7
		public virtual bool CheckActive(NPC npc)
		{
			return true;
		}

		// Token: 0x0600103E RID: 4158 RVA: 0x00008CF7 File Offset: 0x00006EF7
		public virtual bool CheckDead(NPC npc)
		{
			return true;
		}

		// Token: 0x0600103F RID: 4159 RVA: 0x0000ADF8 File Offset: 0x00008FF8
		public virtual bool SpecialNPCLoot(NPC npc)
		{
			return false;
		}

		// Token: 0x06001040 RID: 4160 RVA: 0x00008CF7 File Offset: 0x00006EF7
		public virtual bool PreNPCLoot(NPC npc)
		{
			return true;
		}

		// Token: 0x06001041 RID: 4161 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void NPCLoot(NPC npc)
		{
		}

		// Token: 0x06001042 RID: 4162 RVA: 0x00008CF7 File Offset: 0x00006EF7
		public virtual bool CanHitPlayer(NPC npc, Player target, ref int cooldownSlot)
		{
			return true;
		}

		// Token: 0x06001043 RID: 4163 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void ModifyHitPlayer(NPC npc, Player target, ref int damage, ref bool crit)
		{
		}

		// Token: 0x06001044 RID: 4164 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void OnHitPlayer(NPC npc, Player target, int damage, bool crit)
		{
		}

		// Token: 0x06001045 RID: 4165 RVA: 0x00404F84 File Offset: 0x00403184
		public virtual bool? CanHitNPC(NPC npc, NPC target)
		{
			return null;
		}

		// Token: 0x06001046 RID: 4166 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void ModifyHitNPC(NPC npc, NPC target, ref int damage, ref float knockback, ref bool crit)
		{
		}

		// Token: 0x06001047 RID: 4167 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void OnHitNPC(NPC npc, NPC target, int damage, float knockback, bool crit)
		{
		}

		// Token: 0x06001048 RID: 4168 RVA: 0x00404F84 File Offset: 0x00403184
		public virtual bool? CanBeHitByItem(NPC npc, Player player, Item item)
		{
			return null;
		}

		// Token: 0x06001049 RID: 4169 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void ModifyHitByItem(NPC npc, Player player, Item item, ref int damage, ref float knockback, ref bool crit)
		{
		}

		// Token: 0x0600104A RID: 4170 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void OnHitByItem(NPC npc, Player player, Item item, int damage, float knockback, bool crit)
		{
		}

		// Token: 0x0600104B RID: 4171 RVA: 0x00404F84 File Offset: 0x00403184
		public virtual bool? CanBeHitByProjectile(NPC npc, Projectile projectile)
		{
			return null;
		}

		// Token: 0x0600104C RID: 4172 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void ModifyHitByProjectile(NPC npc, Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
		{
		}

		// Token: 0x0600104D RID: 4173 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void OnHitByProjectile(NPC npc, Projectile projectile, int damage, float knockback, bool crit)
		{
		}

		// Token: 0x0600104E RID: 4174 RVA: 0x00008CF7 File Offset: 0x00006EF7
		public virtual bool StrikeNPC(NPC npc, ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit)
		{
			return true;
		}

		// Token: 0x0600104F RID: 4175 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void BossHeadSlot(NPC npc, ref int index)
		{
		}

		// Token: 0x06001050 RID: 4176 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void BossHeadRotation(NPC npc, ref float rotation)
		{
		}

		// Token: 0x06001051 RID: 4177 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void BossHeadSpriteEffects(NPC npc, ref SpriteEffects spriteEffects)
		{
		}

		// Token: 0x06001052 RID: 4178 RVA: 0x00404FFC File Offset: 0x004031FC
		public virtual Color? GetAlpha(NPC npc, Color drawColor)
		{
			return null;
		}

		// Token: 0x06001053 RID: 4179 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void DrawEffects(NPC npc, ref Color drawColor)
		{
		}

		// Token: 0x06001054 RID: 4180 RVA: 0x00008CF7 File Offset: 0x00006EF7
		public virtual bool PreDraw(NPC npc, SpriteBatch spriteBatch, Color drawColor)
		{
			return true;
		}

		// Token: 0x06001055 RID: 4181 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void PostDraw(NPC npc, SpriteBatch spriteBatch, Color drawColor)
		{
		}

		// Token: 0x06001056 RID: 4182 RVA: 0x00404F84 File Offset: 0x00403184
		public virtual bool? DrawHealthBar(NPC npc, byte hbPosition, ref float scale, ref Vector2 position)
		{
			return null;
		}

		// Token: 0x06001057 RID: 4183 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void EditSpawnRate(Player player, ref int spawnRate, ref int maxSpawns)
		{
		}

		// Token: 0x06001058 RID: 4184 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void EditSpawnRange(Player player, ref int spawnRangeX, ref int spawnRangeY, ref int safeRangeX, ref int safeRangeY)
		{
		}

		// Token: 0x06001059 RID: 4185 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void EditSpawnPool(IDictionary<int, float> pool, NPCSpawnInfo spawnInfo)
		{
		}

		// Token: 0x0600105A RID: 4186 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void SpawnNPC(int npc, int tileX, int tileY)
		{
		}

		// Token: 0x0600105B RID: 4187 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void GetChat(NPC npc, ref string chat)
		{
		}

		// Token: 0x0600105C RID: 4188 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void SetupShop(int type, Chest shop, ref int nextSlot)
		{
		}

		// Token: 0x0600105D RID: 4189 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void SetupTravelShop(int[] shop, ref int nextSlot)
		{
		}

		// Token: 0x0600105E RID: 4190 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void BuffTownNPC(ref float damageMult, ref int defense)
		{
		}

		// Token: 0x0600105F RID: 4191 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void TownNPCAttackStrength(NPC npc, ref int damage, ref float knockback)
		{
		}

		// Token: 0x06001060 RID: 4192 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void TownNPCAttackCooldown(NPC npc, ref int cooldown, ref int randExtraCooldown)
		{
		}

		// Token: 0x06001061 RID: 4193 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void TownNPCAttackProj(NPC npc, ref int projType, ref int attackDelay)
		{
		}

		// Token: 0x06001062 RID: 4194 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void TownNPCAttackProjSpeed(NPC npc, ref float multiplier, ref float gravityCorrection, ref float randomOffset)
		{
		}

		// Token: 0x06001063 RID: 4195 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void TownNPCAttackShoot(NPC npc, ref bool inBetweenShots)
		{
		}

		// Token: 0x06001064 RID: 4196 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void TownNPCAttackMagic(NPC npc, ref float auraLightMultiplier)
		{
		}

		// Token: 0x06001065 RID: 4197 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void TownNPCAttackSwing(NPC npc, ref int itemWidth, ref int itemHeight)
		{
		}

		// Token: 0x06001066 RID: 4198 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void DrawTownAttackGun(NPC npc, ref float scale, ref int item, ref int closeness)
		{
		}

		// Token: 0x06001067 RID: 4199 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void DrawTownAttackSwing(NPC npc, ref Texture2D item, ref int itemSize, ref float scale, ref Vector2 offset)
		{
		}

		// Token: 0x04001352 RID: 4946
		internal int index;

		// Token: 0x04001353 RID: 4947
		internal int instanceIndex;
	}
}
